package com.gaogzhen.designPattern.singleton;

public final class Singleton5 {
    private Singleton5() {}
    // 问题1：属于懒汉式还是饿汉式
    private static class LazyHolder {
        static final Singleton5 instance = new Singleton5();
    }
    // 问题2：是否有并发问题
    public static  Singleton5 getInstance() {
        return LazyHolder.instance;
    }
}
